<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
		<link rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/css/weuix.min.css" />
		<link rel="stylesheet" type="text/css" href="{:ADDON_PUBLIC_PATH}/css/jquery-weui.css"/>
		<link rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/css/register.css" />
		<link rel="stylesheet" type="text/css" href="{:ADDON_PUBLIC_PATH}css/iconfont.css"/>
		<link rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/css/person_edit.css" />
		<link rel="stylesheet" type="text/css" href="{:ADDON_PUBLIC_PATH}/css/guanggao.css"/>
		 <script src="{:ADDON_PUBLIC_PATH}/js/guanggao.js"></script>
		<title><if condition="$isupdate">修改信息</if></title>
		<style type="text/css">
			#bgimg{
				filter:blur(0px);
			}
		</style>
	</head>

	<body>
		
		<div id="bgimg" style="height:40%;"></div>
		<div class="example">
			<img src="{:ADDON_PUBLIC_PATH}/img/touxiang.jpg" id="touxiang" >
		</div>
		
		<div id="posi">
			<form action="">
				<div class="weui_cells weui_cells_form">
				<if condition="$isupdate">
					<if condition="$isteacher">
			<div class="weui_cell">
				<div class="weui_cell_hd"><span class="icon icon-100 iconfont icon-mima-copy-copy icon-interval f-orange"></span></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input class="weui_input" placeholder="请输入部门" name="class">
				</div>
			</div>
						<else/>
						<div class="weui_cell">
				<div class="weui_cell_hd"><span class="icon icon-97 iconfont icon-mima-copy-copy icon-interval f-orange"></span></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input class="weui_input" placeholder="请输入学号" name="no">
				</div>
			</div>
			<div class="weui_cell">
				<div class="weui_cell_hd"><span class="icon icon-100 iconfont icon-mima-copy-copy icon-interval f-orange"></span></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input class="weui_input" placeholder="请输入班级" name="class">
				</div>
			</div>
					</if>
				

					<else/>
					<div class="weui_cell">
				<div class="weui_cell_hd"><span class="icon icon-84 icon-interval f-blue" ></span></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input class="weui_input" placeholder="请输入工号或者身份证号码" name="card_id">
				</div>
			</div>
				</if>
			

			<div class="weui_cell">
				<div class="weui_cell_hd"><span class="icon icon-105 iconfont icon-mima-copy-copy icon-interval f-orange"></span></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input class="weui_input" placeholder="请输入手机号码" name="mobile">
				</div>
			</div>
		</div>
		
		<div class="weui_btn_area">
            <a class="weui_btn weui_btn_primary" href="javascript:" id="btn">确定</a>
        </div>
			</form>
        </div>
       <div class="weui-footer" style="margin-top: 60px;">
		  <p class="weui-footer__links">
		    <a href="http://h.eqxiu.com/s/04twlh4V" class="weui-footer__link">微生活工作室</a>|  <a href="{:U('infoReview')}" class="weui-footer__link">意见反馈</a>
		  </p>
		  <a  href="{:U('term_text_cn')}" class="weui-footer__text" style="border-radius: ;">Copyright © 20016-2017</a>
		</div>
	</body>
	<script src="{:ADDON_PUBLIC_PATH}/js/jquery-3.2.1.min.js"></script>
	<script src="{:ADDON_PUBLIC_PATH}/js/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="{:ADDON_PUBLIC_PATH}/js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="{:ADDON_PUBLIC_PATH}/js/swiper.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
			// $('.example img').on('click', function(){
			// 	var src = $('.example img')[0].src;
			// 	var pb1 = $.photoBrowser({
			// 		  items: [
			// 		    src
			// 		  ]
			// 		});
			// 	pb1.open();
			// 	$('.swiper-pagination').children('span').remove();
			// });
		});
		$(document).on('click', '#btn', function() {
          	$.showLoading();
		    var data = $('form').serialize();
		    var url = $('form').attr('action');
		    $.ajax({
			    url:url,
			    type:"post",
			    dataType:"json",
			    data:data,
			    success:function(data){
			     	$.hideLoading();
		            console.log(data);
		            if (data.status == 1) {
		                 $.toast(data.info); 
		                 setTimeout(function(){
		                 	//  history.pushState("","","{:U('booksDetail',array('bid'=>I('get.bid')))}");  
		                 	location.href = "{:U('studInfo',array('aid'=>I('get.aid')))}";
		                 	// window.history.go(-1);
		                 },1500);
		            } else {
		                 $.toast(data.info, "forbidden");
		            }
			    },
			    error:function(){
			      	$.toast("错误", "forbidden");
			    }
			});
		    return false;
		})
	</script>
</html>